const message = "Hello World"

const newMessage = message.padStart(15,"*").padEnd(20,"-")
console.log(newMessage)

//案例
const carNumber = "1234245645656789987654"
const lastFourCard = carNumber.slice(-4)
const finalCard = lastFourCard.padStart(carNumber.length,'*')
console.log(finalCard)